-
Notifications
You must be signed in to change notification settings - Fork 7
Select the latest product version in showfor picker if user's version exceeds selectable options #968
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is still a problem (see https://bugzilla.mozilla.org/show_bug.cgi?id=1830284#c6 for an example). |
This is still a problem. For example, see https://bugzilla.mozilla.org/show_bug.cgi?id=1957915#c1 |
I can confirm that this issue is verified fixed in I'm moving this ticket inside the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From: https://bugzilla.mozilla.org/show_bug.cgi?id=1743073
This should be possible with a small tweak to our showfor.js code. For nightly users, the following block gets executed:
https://github.com/mozilla/kitsune/blob/88701d663c5f0e5d24a9e75794a054e422d0f4da/kitsune/sumo/static/sumo/js/showfor.js#L96-L101
And
target
becomesnull
, since (e.g.)fx96
doesn't exist inthis.data.versions[product]
. We catch that null value below, and return nothing, so the select box just uses the default:https://github.com/mozilla/kitsune/blob/88701d663c5f0e5d24a9e75794a054e422d0f4da/kitsune/sumo/static/sumo/js/showfor.js#L110-L114
Here we could instead set
target
to the most recent version fromthis.data.versions[product]
ifval
is greater than it (with appropriate guards against conditions like"fx71" < "fx8"
returning true). I'm not sure if we can rely onthis.data.versions[product]
being ordered.The text was updated successfully, but these errors were encountered: